/*--------------------------------------------------------------------------------------------------
Yatak Operation System Project Copyright 2012-2013
Author : Ilya Churaev
Started : 2 Feb 2013		Updated : 2 Feb 2013
File Name : pokex.h			Purpose : poke/peek byte functions
--------------------------------------------------------------------------------------------------*/
#ifndef _POKE_X_H
#define _POKE_X_H

#ifdef __cplusplus
extern "C" {
#endif

#define	pokeb(S,O,V)		_farpokeb(0x10, 16uL * (S) + (O), V)
#define	peekb(S,O)			_farpeekb(0x10, 16uL * (S) + (O))
#define	pokew(S,O,V)		_farpokeb(0x10, 16uL * (S) + (O), V)
#define	pokel(S,O,V)		_farpokeb(0x10, 16uL * (S) + (O), V)
#define	peekl(S,O)			_farpeekl(0x10, 16uL * (S) + (O))

void _farpokeb(unsigned short selector, unsigned long offset, unsigned char value);
	 
unsigned char _farpeekb(unsigned short, unsigned long);

void _farpokew(unsigned short selector, unsigned long offset, unsigned char value);
	 
void _farpokel(unsigned short selector, unsigned long offset, unsigned char value);
	 
unsigned long _farpeekl(unsigned short selector, unsigned long offset);

#ifdef __cplusplus
}
#endif

#endif
